<template>
  <div class="app-container">
    <h4>打卡记录</h4>
    <el-table
        v-loading="listLoading"
        :data="reportList"
        stripe
        style="width: 100%">

      <el-table-column
          label="序号"
          width="70"
          align="center">
        <template slot-scope="scope">
          {{ scope.$index + 1 }}
        </template>
      </el-table-column>

      <el-table-column prop="name" label="姓名"/>
      <!--        <el-table-column prop="param.certificatesTypeString" label="证件类型"/>-->
      <!--        <el-table-column prop="certificatesNo" label="证件编号"/>-->
      <!--        <el-table-column label="性别">-->
      <!--        <template slot-scope="scope">-->
      <!--                {{ scope.row.sex == 1 ? '男' : '女' }}-->
      <!--        </template>-->
      <!--        </el-table-column>-->
      <el-table-column prop="healthCon" label="健康状态"/>
      <el-table-column prop="temperature" label="体温（度）"/>
      <el-table-column prop="location" label="所在地"/>
      <el-table-column label="是否处于隔离状态">
        <template slot-scope="scope">
          {{ scope.row.isolated == 1 ? '是' : '否' }}
        </template>
      </el-table-column>
      <el-table-column label="是否为重点人群">
        <template slot-scope="scope">
          {{ scope.row.focusGroups == 1 ? '是' : '否' }}
        </template>
      </el-table-column>
      <el-table-column label="是否与感染者接触">
        <template slot-scope="scope">
          {{ scope.row.virusTouch == 1 ? '是' : '否' }}
        </template>
      </el-table-column>
      <el-table-column prop="reportDate" label="注册时间"/>
      <el-table-column label="备注">
        <template slot-scope="scope">
          {{ scope.row.remark ===''  ? '无' : scope.row.remark }}
        </template>
      </el-table-column>
    </el-table>
  </div>



</template>
<script>
import jwtDecode from "jwt-decode";
import {getToken} from "@/utils/auth";
import {getUserReportList} from "@/views2/api/myselfManager";

export default {
  name:"reportInfo",
  // 定义数据
  data() {
    return {
      id: this.$route.params.id,
      listLoading:true,
      userInfoList: {}, // 用户基本信息
      reportList: [], // 打卡记录信息
      dialogFormVisibleUserBasic:false,
      formUserBasic:{},
      dialogFormVisibleAuthBasic:false,
      formAuthBasic:{},
      idTypeList:[]
    }
  },

  // 当页面加载时获取数据
  created() {
    this.getUserReportList();
  },

  methods: {

    getUserReportList(){
      getUserReportList(jwtDecode(getToken()).userId).then(res=>{

        let arr=res.data.data;

        this.reportList=arr

        console.log(arr)

        this.listLoading=false


      }).catch(error=>{})

    },
  }
}
</script>
